﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Forum.aspx.cs" Inherits="it_security_project.Forum_" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:ObjectDataSource ID="ThreadListObjectDataSource" runat="server" SelectMethod="GetThreads" 
    TypeName="it_security_project.App_Code.BusinessLogicLayer.Service" DataObjectTypeName="App_Code.BusinessLogicLayer.Thread"/>

    <asp:ListView ID="ThreadListView" runat="server" DataSourceID="ThreadListObjectDataSource" DataKeyNames="ThreadID">
    <ItemTemplate>
        <p>
            <asp:HyperLink ID="ThreadLinkButton" runat="server" Text='<%# Bind("Title") %>' CausesValidation="false"
             NavigateUrl='<%# Eval("ThreadID", "~/ForumThread.aspx?thread={0}")%>'></asp:HyperLink>
        </p>
    </ItemTemplate>

    </asp:ListView>   

    <form id="form1" runat="server">
    <p>
        <asp:Button ID="CreateThreadLink" OnClick="CreateThreadOnClick" runat="server" Text="Create Thread"></asp:Button>
    </p>
    </form>
</asp:Content>
